#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from dragon.selector import Selector
from pages.earlytrade import EarlyTradePage
from pages.calendar import Calendar
from dragon.page import DraPage

class EarlyTradePage4Se:
    calendarButton = Selector('div.df.time-text', '日历按钮')

class EarlyTradePage4(EarlyTradePage):
    def __init__(self,draPage:DraPage):
        super().__init__(draPage)
        self.calendarButton=draPage.locator(EarlyTradePage4Se.calendarButton)

    def pick_date_by_index(self, index: int):
        self.calendarButton.click()
        calendar = Calendar(self.draPage)
        calendar.pick_date_by_index(index)

